package edu.mercer.sse.bkp;

/**
 * Convert between Exception types.<p>
 *
 * Visitor Pattern: Element. Interface for accept in Visitor Pattern.<p>
 *
 * Example usage: Checked exception into Unchecked exception.<p>
 *
 * @param <T> - Generic bounded by Throwable
 * 
 * @param <V> - Generic unbounded as Visitor
 * 
 * @see BackupErrorConversionVisitor
 */

public interface VisitableConversion<T extends Throwable,
									 V> 
{
	/**
	 * Accept BackupErrorConversionVisitor visitor.<p>
	 * 
	 * Accept concrete visitor: BackupErrorConversionVisitor. Converted 
	 * 	exception returned from accept.<p> 
	 * 
	 * @param visitor - BackupErrorConversionVisitor
	 * 
	 * @return  Generic bounded by Throwable; i.e., exception converted
	 */
	
	T accept( BackupErrorConversionVisitor visitor );
	
	/**
	 * Accept visitor.<p>
	 * 
	 * Generic form of accept. Allows implementation with any visitor.<p>
	 * 
	 * @param visitor - Generic unbounded, Visitor
	 * 
	 * @return  Generic bounded by Throwable; i.e., exception converted
	 */
	
	T accept( V visitor );

	
}//interface
